package com.deng.heney.mapper;

import com.deng.heney.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    @Insert("insert into `user` (username, password, name, phone, email, address, avatar)" +
            "values (#{username}, #{password}, #{name}, #{phone}, #{email}, #{address}, #{avater})")
    void insert(User user);

    @Select("select * from `user`")
    List<User> selectAll(User user);
}
